package com.cdxy.model.dto.base.controller;

import com.cdxy.model.dto.base.resp.ApiResponse;

/**
 * @Author: tangy
 * @Date: 2020/2/20 13:37
 */
public class BaseController {
    /**
     *  构造基本返回参数
     * @param result
     * @param <T>
     * @return
     */
    public <T> ApiResponse<T> successApiResponse(T result) {
        return new ApiResponse<>(result);
    }


    public <T> ApiResponse<T> successApiResponse(String msg) {
        return new ApiResponse<>();
    }

    /**
     *  构造基本返回参数
     * @param <T>
     * @return
     */
    public <T> ApiResponse<T> successApiResponse() {
        return new ApiResponse<>();
    }
}
